from zhipuai import ZhipuAI
import json
import requests
# 这个api是根据公司基本信息某个字段是某个值来查询具体的公司名称
client = ZhipuAI(api_key="8fb21e517a965b10cf87b7fdadf18a74.UVLbxTJXdL3YLxcT") # 请填写您自己的APIKey
domain = "comm.chatglm.cn"

url = f"https://{domain}/law_api/search_company_name_by_register"

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer DE32EB46D23350E0B75B3702C8D5DC036F8CE32DC73C919D'
}

data = {
    "key": "注册号",
    "value": "350781100073458"
}

rsp = requests.post(url, json=data, headers=headers)
print(rsp.json())